package com.cskaoyan._05protected.one;

import com.cskaoyan._05protected.another.AnotherPackageSonClazz;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/9 11:02
 **/
/*
表示同包下的子类


 */
public class SamePackageSonClazz extends CurrentClazz{
    public static void main(String[] args) {
        // 创建父类对象访问
        CurrentClazz cc = new CurrentClazz();
        System.out.println(cc.a);

        // 创建子类的"兄弟"对象去访问
        AnotherPackageSonClazz as = new AnotherPackageSonClazz();
        System.out.println(as.a);
        // 创建子类自身对象去访问

        SamePackageSonClazz ss = new SamePackageSonClazz();
        System.out.println(ss.a);
    }
}
